home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Python 1.4 / Python 1.4 source / Mac / Include / pythonresources.h < prev   
Encoding:
C/C++ Source or Header  |  1996-10-22  |  3.7 KB  |  129 lines  |  [TEXT/CWIE]

  1. /*
  2. ** Resource-IDs in use by Python.
  3. **
  4. ** All resources used by the python interpreter itself fall
  5. ** in the range 128-256.
  6. **
  7. ** Standard python modules use resources in the range
  8. ** 256-512.
  9. **
  10. ** Python programs that use their own resources are advised to
  11. ** choose resource numbers higher than 512.
  12. */
  13.  
  14. /*
  15. ** Resources that reside in the python executable (or, for
  16. ** shared ppc python, in the core dynamic library)
  17. */
  18.  
  19. /* The alert for "No Python directory, where is it?" (OBSOLETE) */
  20. #define NOPYTHON_ALERT    128
  21. #define YES_ITEM        1
  22. #define NO_ITEM            2
  23. #define CURWD_ITEM        3
  24.  
  25. /* The alert for "this is an applet template" */
  26. #define NOPYC_ALERT        129
  27.  
  28. /* The dialog for our GetDirectory and PromptGetFile call */
  29. #define GETDIR_ID         130        /* Resource ID for our "get directory" */
  30. #define GETFILEPROMPT_ID 132    /* Resource id for prompted get file */
  31. #define PROMPT_ITEM        10        /* The prompt, at the top */
  32. #define SELECTCUR_ITEM    11    /* "Select current directory" button */
  33.  
  34.  
  35. /* The dialog for interactive options */
  36. #define OPT_DIALOG        131        /* Resource ID for dialog */
  37. #define OPT_OK            1
  38. #define OPT_CANCEL        2
  39. #define OPT_INSPECT        3
  40. #define OPT_VERBOSE        4
  41. #define OPT_SUPPRESS    5
  42. #define OPT_UNBUFFERED    6
  43. #define OPT_DEBUGGING    7
  44. #define OPT_KEEPNORMAL    8
  45. #define OPT_KEEPERROR    9
  46. #define OPT_CMDLINE        10
  47.  
  48. /* Dialog for 'No preferences directory' */
  49. #define NOPREFDIR_ID    133
  50.  
  51. /* Dialog for 'Create preferences file?' */
  52. #define NOPREFFILE_ID    134
  53. #define NOPREFFILE_YES    1
  54. #define NOPREFFILE_NO    2
  55.  
  56. /* Dialog for 'Bad preference file' */
  57. #define BADPREFFILE_ID    135
  58.  
  59. /* About box */
  60. #define ABOUT_ID        136
  61.  
  62. /* No preferences file name resource */
  63. #define NOPREFNAME_ID    137
  64.  
  65. /* EditPythonPrefs range. Needed here to forestall conflicts with applets */
  66. #define EDITPYTHONPREFS_MIN    500
  67. #define EDITPYTHONPREFS_MAX 511
  68.  
  69. /*
  70. ** The following are valid both in the binary (or shared library)
  71. ** and in the Preferences file.
  72. ** For all these the override is tried first, in the application resource fork
  73. ** only, this allows an applet to override standard settings.
  74. ** If there is no override resource the preferences file is added to the head
  75. ** of the resource file chain and the non-override version of the resource is
  76. ** searched in any resource file.
  77. **
  78. ** The effect of this is that, for example, a 'Popt' of 128 in the application or
  79. ** shared library provides default options for use when no preferences are set,
  80. ** while a 'Popt' of 129 (in the application *only*) overrides any options in the
  81. ** preferences file.
  82. */
  83.  
  84. /* The STR resource that holds the preference file name */
  85. /* #define PREFFILENAME_ID 128 */
  86. #define PREFFILENAME_NAME "\pPythonPreferenceFileName"
  87.  
  88. /* The STR# resource for sys.path initialization */
  89. #define PYTHONPATH_ID 128
  90. #define PYTHONPATHOVERRIDE_ID 129
  91.  
  92. /* The alis resource for locating the python home directory */
  93. #define PYTHONHOME_ID 128
  94. #define PYTHONHOMEOVERRIDE_ID 129
  95.  
  96. /* The Python options resource and offset of its members */
  97. #define PYTHONOPTIONS_ID 128
  98. #define PYTHONOPTIONSOVERRIDE_ID 129
  99. #define POPT_INSPECT    0
  100. #define POPT_VERBOSE    1
  101. #define POPT_SUPPRESS    2
  102. #define POPT_UNBUFFERED    3
  103. #define POPT_DEBUGGING    4
  104. #define POPT_KEEPNORM    5
  105. #define POPT_KEEPERR    6
  106. #define POPT_NOINTOPT    7    /* Not settable interactively */
  107. #define POPT_NOARGS        8    /* Not settable interactively */
  108.  
  109. typedef struct PyMac_PrefRecord {
  110.     unsigned char    inspect;
  111.     unsigned char    verbose;
  112.     unsigned char    suppress_print;
  113.     unsigned char    unbuffered;
  114.     unsigned char    debugging;
  115.     unsigned char    keep_normal;
  116.     unsigned char    keep_error;
  117.     unsigned char    nointopt;
  118.     unsigned char    noargs;
  119. } PyMac_PrefRecord;
  120.  
  121. /* The GUSI options resources */
  122. #define GUSIOPTIONS_ID    10240
  123. #define GUSIOPTIONSOVERRIDE_ID 10241
  124.  
  125. /* From macgetpath.c: */
  126. void PyMac_PreferenceOptions Py_PROTO((PyMac_PrefRecord *));
  127.  
  128.  
  129.